const path = require('path');

// TypeORM CLI 配置文件 (使用 CommonJS 语法)
module.exports = {
  type: 'mysql',
  host: 'localhost',
  port: 3306,
  username: 'root',
  password: 'root1234',
  database: 'nest_base',
  charset: 'utf8mb4',
  timezone: '+08:00',
  synchronize: false,
  logging: true,
  entities: [path.join(__dirname, 'src/modules/**/*.entity{.ts,.js}')],
  migrations: [path.join(__dirname, 'migrations/*{.ts,.js}')],
  migrationsRun: true,
  migrationsTableName: 'migrations',
  extra: {
    connectionLimit: 10,
  },
}; 